import { createRouter, createWebHistory } from "vue-router";
import { orderRouter } from "@monorepo/order";
import { userRouter } from "@monorepo/user";
import { productRouter } from "@monorepo/product";

const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: "/",
      component: () => import("../views/ProductView.vue"),
    },
    {
      path: "/demo",
      component: () => import("../views/demo.vue"),
    },
    // 子应用的router
    ...orderRouter,
    ...userRouter,
    ...productRouter,
  ],
});

export default router;
